package gorm

import mysqlDriver "github.com/go-sql-driver/mysql"

func genDSN(dsn, addr string) (res string) {
	cfg, err := mysqlDriver.ParseDSN(dsn)
	if err != nil {
		return
	}
	cfg.Addr = addr
	cfg.Net = "tcp"
	res = cfg.FormatDSN()
	return
}
